<extend name="Base/common"/>
<block name="Content">
    <div class="am-cf am-padding-top">
        <div class="am-fl am-cf">
            <notempty name="dicModel">
                <i class="am-icon-pencil-square-o"></i>
                <else/><i class="am-icon-plus-square"></i>
            </notempty>
            <strong class="am-text-primary am-text-lg">
                <notempty name="dicModel">
                    编辑<else/>新增
                </notempty>类型
            </strong>
        </div><hr data-am-widget="divider" class="am-divider am-divider-default" />
    </div>
    <div class="am-tabs" data-am-tabs>
        <ul class="am-tabs-nav am-nav am-nav-tabs">
            <li class="am-active">
                <a href="#tab1">类型信息</a>
            </li>
        </ul>
        <div class="am-tabs-bd">
            <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                <form class="am-form" method="post" action="{:U('Dictionary/addAction')}">
                <div class="am-g">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                        标识 
                    </div>
                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                        <notempty name="dicModel">
                            <input type="text" class="am-input-sm" name="dict_group" value="{$dicModel.dict_group}" readonly="readonly" /><else/><input type="text" class="am-input-sm" name="dict_group" value="{$dicModel.dict_group}"/>
                        </notempty>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6">
                        *必填，不可重复
                    </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                        名称
                    </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <input type="text" class="am-input-sm" name="dict_name" value="{$dicModel.dict_name}" required/>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6">
                        *必填，不可重复
                    </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                        类型
                    </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <select data-am-selected="{ btnSize: 'sm', btnStyle: 'secondary',maxHeight: 100}" name="dict_type" id="dict_type" url="{:U('Dictionary/dictEnumList')}">
                            <option value="select" selected="selected">下拉框</option>
                            <option value="textarea">文本多行</option>
                            <option value="text">单行文本</option>
                            <option value="checkbox">多选框</option>
                            <option value="radio">单选框</option>
                        </select>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6">
                    </div>
                    <div class="am-hide-sm-only am-u-md-6">
                    </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                        备注
                    </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <textarea rows="2" class="am-input-sm" name="remark">{$dicModel.remark}</textarea>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6">
                    </div>
                </div>
           
            <div class="am-margin">
                <button type="submit" class="am-btn am-btn-success am-btn-xs ajax-post" target-form="am-form">
                    提交保存
                </button>
                <button type="button" class="am-btn am-btn-secondary am-btn-xs" onclick="javascript:history.back(-1);return false;">
                    返回列表
                </button>
                <input type="hidden" value="{$dicModel.dict_id}" name="dict_id">
            </div>
            </form>
        </block>
        <block name="script">
            <script type="text/javascript">
                Think.setValue('dict_type', '{$dicModel.dict_type|default=select}');
            </script>
        </block>
